using System;
using System.Data;
using System.Collections.Generic;
using System.Collections;
using log4net;
using FSS.BLL.Entities;
namespace FSS.BLL.Services
{
	#region MeasureService

	/// <summary>
	/// MeasureService object for Ibatis mapped table 'Measure'.
	/// </summary>
	public class MeasureService : IMeasureService
	{
		private static readonly ILog log = LogManager.GetLogger(typeof(MeasureService).Name);
	  	private static volatile MeasureService _MeasureService = null;
        public static MeasureService GetInstance()
        {
            if (_MeasureService == null)
            {
                lock (typeof(MeasureService))
                {
                    if (_MeasureService == null) // double-check
                        _MeasureService = new MeasureService();
                }
            }
            return _MeasureService;
        }
		public MeasureService()
        {
            //
            // TODO: Add constructor logic here
            //
        }        
        public IList<MeasureEntity> LoadByProductId(MeasureEntity objE)
        {
            try
            {
                return ExecuteQueryForList<MeasureEntity>("MeasureLoadByProductId", objE);
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                return null;
            }
        }
        public IList<MeasureEntity> LoadByPrimaryKeyList(MeasureEntity objE)
        {
            try
            {
                return ExecuteQueryForList<MeasureEntity>("MeasureLoadByPrimaryKeyList", objE);
            }
            catch (Exception ex)
            {
                log.Debug(ex.Message);
                return null;
            }
        }
	}
	#endregion  
}
